﻿#ifndef CONFIG_DIALOG_H
#define CONFIG_DIALOG_H
#include <QDialog>
#include <QJsonObject>
#include <QPushButton>
#include "ui/config_item_widget.h"
#include <QVBoxLayout>

class ConfigDialog : public QDialog
{
    Q_OBJECT
public:
  explicit  ConfigDialog(QString strConfigDir,QString strCOnfigFileName,QWidget *parent = nullptr);
  explicit  ConfigDialog(QWidget *parent = nullptr);
public slots:
    void slotClickSaveConfig();
private:
    void initUI();
    void initConnect();
    QString getConfigDir();
    QString getConfigFilePath();

    QString m_strConfigDir;
    QString m_strConfigFileName;
    ConfigItemWidget *m_resultItem;
    QVector<ConfigItemWidget *> m_vectNums;
    QVBoxLayout *m_layoutMain;
    QPushButton *m_btnSave;
};

#endif // CONFIG_DIALOG_H
